package com.demo2do.fms.entity.supplier.common;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

import com.demo2do.fms.entity.vehicle.ModifiedStatus;

/**
 *
 * @author Ark
 *
 */
@Entity
@Table(name = "FMS_SUPPLIER_MODIFIED_VERSION")
public class SupplierModifiedVersion {
    
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "generator")
    @SequenceGenerator(name = "generator", sequenceName = "HIBERNATE_SEQUENCE", allocationSize = 1)
    private Long id;
    
    /** 变更状态 */
    private ModifiedStatus status;
    
    /** 版本号 */
    private int versionSorting;
    
    /** 公司ID */
    private Long supplierId;
    
    /** 运输公司代码  */
    private String code;
    
    /** 运输公司现用名(全称) */
    private String name;
    
    /** 对应供方基本信息  */
    private Long supplierInfoId;
    
    /** 运输公司曾用名(全称)I */
    private String formerName;
    
    /** 运输公司曾用名II(全称) */
    private String secondFormerName;
    
    /** 董事长 */
    private String chairman;
    
    /** 总经理*/
    private String manager;
    
    /** 总经理联系电话 */
    private String managerPhone;
    
    /** 总经理EmailI */
    private String managerEmail;
    
    /** 注册资金（万元） */
    private String registerCapital;
    
    /** 成立年份 */
    @DateTimeFormat(pattern = "yyyy-MM")
    private Date yearFounded;
    
    /** 注册地  */
    private String registerAddress;
    
    /** 联系地址 */
    private String contactAddress;
    
    /** 体系标准文件类型 */
    private String standardDocument;
    
    /** 体系标准文件类型 - 有效期 */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date standardDocumentDate;
    
    /** 营业执照原件扫描件上传  */
    private String businessLicense;
    
    /** 营业执照原件扫描件 - 有效期 */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date businessLicenseDate;
    
    /** 质量体系认证证书原件扫描件上传  */
    private String qualitySystem;
    
    /** 质量体系认证证书原件扫描件 - 有效期 */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date qualitySystemDate;
    
    /** 办公及停车场地租房/购房合同扫描件上传 */
    private String leaseContract;
    
    /** 办公及停车场地租房/购房合同扫描件 - 有效期 */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date leaseContractDate;
    
    /** 道路运输许可证 */
    private String transportCert;
    
    /** 道路运输许可证 - 有效期 */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date transportCertDate;
    
    /** 变更申报表 */
    private String changeForm;

    /**
     * 统一社会信用代码
     */
    private String uniformSocialCreditCode;
    
    @Column(name = "is_disabled")
    private boolean disabled;
    
    /**
     * The default constructor
     */
    public SupplierModifiedVersion() {
    }
    
    /**
     * 
     * @param supplier
     * @param version
     */
    public SupplierModifiedVersion(Supplier supplier, int version) {
        this.supplierId = supplier.getId();
        this.versionSorting = version;
        this.status = ModifiedStatus.AUDITING;
        this.disabled = false;
    }
    
    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the status
     */
    public ModifiedStatus getStatus() {
        return status;
    }

    /**
     * @return the versionSorting
     */
    public int getVersionSorting() {
        return versionSorting;
    }

    /**
     * @return the supplierId
     */
    public Long getSupplierId() {
        return supplierId;
    }

    /**
     * @return the code
     */
    public String getCode() {
        return code;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @return the supplierInfoId
     */
    public Long getSupplierInfoId() {
        return supplierInfoId;
    }

    /**
     * @return the formerName
     */
    public String getFormerName() {
        return formerName;
    }

    /**
     * @return the secondFormerName
     */
    public String getSecondFormerName() {
        return secondFormerName;
    }

    /**
     * @return the chairman
     */
    public String getChairman() {
        return chairman;
    }

    /**
     * @return the manager
     */
    public String getManager() {
        return manager;
    }

    /**
     * @return the managerPhone
     */
    public String getManagerPhone() {
        return managerPhone;
    }

    /**
     * @return the managerEmail
     */
    public String getManagerEmail() {
        return managerEmail;
    }

    /**
     * @return
     */
    public String getRegisterCapital() {
		return registerCapital;
	}

    /**
     * @return the yearFounded
     */
    public Date getYearFounded() {
        return yearFounded;
    }

    /**
     * @return the registerAddress
     */
    public String getRegisterAddress() {
        return registerAddress;
    }

    /**
     * @return the contactAddress
     */
    public String getContactAddress() {
        return contactAddress;
    }
    
    /**
     * @return
     */
    public String getStandardDocument() {
        return standardDocument;
    }
    
    /**
     * @return
     */
    public Date getStandardDocumentDate() {
        return standardDocumentDate;
    }

    /**
     * @return the businessLicense
     */
    public String getBusinessLicense() {
        return businessLicense;
    }

    /**
     * @return the businessLicenseDate
     */
    public Date getBusinessLicenseDate() {
        return businessLicenseDate;
    }

    /**
     * @return the qualitySystem
     */
    public String getQualitySystem() {
        return qualitySystem;
    }

    /**
     * @return the qualitySystemDate
     */
    public Date getQualitySystemDate() {
        return qualitySystemDate;
    }

    /**
     * @return the leaseContract
     */
    public String getLeaseContract() {
        return leaseContract;
    }

    /**
     * @return the leaseContractDate
     */
    public Date getLeaseContractDate() {
        return leaseContractDate;
    }

    /**
     * @return the transportCert
     */
    public String getTransportCert() {
        return transportCert;
    }

    /**
     * @return the transportCertDate
     */
    public Date getTransportCertDate() {
        return transportCertDate;
    }
    
    /**
     * @return
     */
    public String getChangeForm() {
        return changeForm;
    }

    /**
     * @return the disabled
     */
    public boolean isDisabled() {
        return disabled;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param status the status to set
     */
    public void setStatus(ModifiedStatus status) {
        this.status = status;
    }

    /**
     * @param versionSorting the versionSorting to set
     */
    public void setVersionSorting(int versionSorting) {
        this.versionSorting = versionSorting;
    }

    /**
     * @param supplierId the supplierId to set
     */
    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    /**
     * @param code the code to set
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @param supplierInfoId the supplierInfoId to set
     */
    public void setSupplierInfoId(Long supplierInfoId) {
        this.supplierInfoId = supplierInfoId;
    }

    /**
     * @param formerName the formerName to set
     */
    public void setFormerName(String formerName) {
        this.formerName = formerName;
    }

    /**
     * @param secondFormerName the secondFormerName to set
     */
    public void setSecondFormerName(String secondFormerName) {
        this.secondFormerName = secondFormerName;
    }

    /**
     * @param chairman the chairman to set
     */
    public void setChairman(String chairman) {
        this.chairman = chairman;
    }

    /**
     * @param manager the manager to set
     */
    public void setManager(String manager) {
        this.manager = manager;
    }

    /**
     * @param managerPhone the managerPhone to set
     */
    public void setManagerPhone(String managerPhone) {
        this.managerPhone = managerPhone;
    }

    /**
     * @param managerEmail the managerEmail to set
     */
    public void setManagerEmail(String managerEmail) {
        this.managerEmail = managerEmail;
    }

    /**
     * @param registerCapital
     */
    public void setRegisterCapital(String registerCapital) {
		this.registerCapital = registerCapital;
	}

    /**
     * @param yearFounded the yearFounded to set
     */
    public void setYearFounded(Date yearFounded) {
        this.yearFounded = yearFounded;
    }

    /**
     * @param registerAddress the registerAddress to set
     */
    public void setRegisterAddress(String registerAddress) {
        this.registerAddress = registerAddress;
    }

    /**
     * @param contactAddress the contactAddress to set
     */
    public void setContactAddress(String contactAddress) {
        this.contactAddress = contactAddress;
    }
    
    /**
     * @param standardDocument
     */
    public void setStandardDocument(String standardDocument) {
        this.standardDocument = standardDocument;
    }
    
    /**
     * @param standardDocumentDate
     */
    public void setStandardDocumentDate(Date standardDocumentDate) {
        this.standardDocumentDate = standardDocumentDate;
    }

    /**
     * @param businessLicense the businessLicense to set
     */
    public void setBusinessLicense(String businessLicense) {
        this.businessLicense = businessLicense;
    }

    /**
     * @param businessLicenseDate the businessLicenseDate to set
     */
    public void setBusinessLicenseDate(Date businessLicenseDate) {
        this.businessLicenseDate = businessLicenseDate;
    }

    /**
     * @param qualitySystem the qualitySystem to set
     */
    public void setQualitySystem(String qualitySystem) {
        this.qualitySystem = qualitySystem;
    }

    /**
     * @param qualitySystemDate the qualitySystemDate to set
     */
    public void setQualitySystemDate(Date qualitySystemDate) {
        this.qualitySystemDate = qualitySystemDate;
    }

    /**
     * @param leaseContract the leaseContract to set
     */
    public void setLeaseContract(String leaseContract) {
        this.leaseContract = leaseContract;
    }

    /**
     * @param leaseContractDate the leaseContractDate to set
     */
    public void setLeaseContractDate(Date leaseContractDate) {
        this.leaseContractDate = leaseContractDate;
    }

    /**
     * @param transportCert the transportCert to set
     */
    public void setTransportCert(String transportCert) {
        this.transportCert = transportCert;
    }

    /**
     * @param transportCertDate the transportCertDate to set
     */
    public void setTransportCertDate(Date transportCertDate) {
        this.transportCertDate = transportCertDate;
    }
    
    /**
     * @param changeForm
     */
    public void setChangeForm(String changeForm) {
        this.changeForm = changeForm;
    }

    /**
     * @param disabled the disabled to set
     */
    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }


    public String getUniformSocialCreditCode() {
        return uniformSocialCreditCode;
    }

    public void setUniformSocialCreditCode(String uniformSocialCreditCode) {
        this.uniformSocialCreditCode = uniformSocialCreditCode;
    }
}
